package com.bootdo.lvyou_specialty.dao;

import com.bootdo.lvyou_specialty.domain.LvyouSpecialtyProduct;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 
 * @author haojiangbo
 * @email 2100272728@qq.com
 * @date 2019-10-10 11:41:24
 */
@Mapper
public interface LvyouSpecialtyProductDao {

	LvyouSpecialtyProduct get(Long id);
	
	List<LvyouSpecialtyProduct> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(LvyouSpecialtyProduct lvyouSpecialtyProduct);
	
	int update(LvyouSpecialtyProduct lvyouSpecialtyProduct);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);

	List<LvyouSpecialtyProduct> getByTypeFront(Map<String, Object> param);

	List<LvyouSpecialtyProduct> compoundQuery(Map<String, Object> map);

	Integer compoundQueryCount(Map<String, Object> map);

	List<LvyouSpecialtyProduct> getFromMap(@Param("ids") Set<String> ids);

	@Select("select msp.id, msp.images from me_lvyou_specialty_product msp where status = 1 and is_lunbo = 2 and type_id = #{typeId} order by rank ")
	List<LvyouSpecialtyProduct> getLunbo(@Param("typeId")Long typeId);
}
